import type { FormInstance } from 'antd/lib/form';
import { makeAutoObservable } from 'mobx';

export default class ResetPasswordStore {
  /** 确认账户表单实例 */
  sureAccountForm: FormInstance | undefined;

  /** 重置密码表单实例 */
  resetPasswordForm: FormInstance | undefined;

  /** 确认账户表单填写值 */
  sureAccountFormInitValues:
    | {
        username?: string;
        email?: string;
      }
    | undefined;

  constructor() {
    makeAutoObservable(this);
  }

  /** 设置 确认账户表单实例 */
  setSureAccountForm(form?: FormInstance) {
    this.sureAccountForm = form;
  }

  /** 设置 确认账户表单实例 */
  setResetPasswordForm(form?: FormInstance) {
    this.resetPasswordForm = form;
  }
}

export const resetPasswordStore = new ResetPasswordStore();
